package com.example.service;

import com.example.common.base.service.BaseService;
import com.example.common.utils.ApiResult;
import com.example.model.entity.*;
import com.example.model.query.TEquipmentQuery;
import com.example.model.query.TSourceQuery;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *  Service接口
 *
 * @author Tellsea
 * @Description Created on 2020-12-11
 */
@Service
public interface TEquipmentService extends BaseService<TEquipment> {
     ApiResult<List<TEquipment>> getList();
     ApiResult<Boolean> saveT(TEquipmentQuery area);
     /**
      * 用户信息分页查询
      *
      * @param query
      * @return
      */
     ApiResult<TEquipmentQuery> pageUserVoByQuery(TEquipmentQuery query) ;
     ApiResult<TEquipmentQuery> getInfo(String id);
     ApiResult<Boolean> modify(TEquipmentQuery area);

     /**
      * 告警信号处理
      *
      * @param message
      * @return
      */
     ApiResult<Boolean> dealMessage(String message,Long status,TEquipmentPart part) throws Exception;

     /**
      * 调度登录
      *
      * @param user
      * @return
      */
     ApiResult<Boolean> idispatchLogin(TUser user) throws InterruptedException, Exception;

     /**
      * 启动预案
      *
      * @param part
      * @return
      */
     ApiResult<Boolean> startPlan(TEquipmentPart part,String warning) throws Exception;

     /**
      * 告警信息传入
      *
      * @param mac_id 设备编号
      * @param num 告警触发通道
      * @return
      */
     void handleWarningInfo(String mac_id,int num,String message,Long status) throws Exception;

     ApiResult<Boolean> sendSms(TPlan plan,String warning) throws Exception;

     ApiResult<Boolean> broadcast(TPlan plan,String warning) throws Exception;


}
